package demo.day09

fun main() {
    println(AddClass(1, 2) + AddClass(0, 0))
}


data class AddClass(var num1: Int, var num2: Int) {
    // + 重载
    operator fun plus(addClass: AddClass): Int {
        return (num1 + addClass.num1) + (num2 + addClass.num2)
    }
}